package com.era.act.usr;

import java.util.List;


import com.era.entity.Users;
import com.era.srv.UsersSrv;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

public class UserDeleteAction extends ActionSupport implements ModelDriven<Users> {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3715243739272597725L;
	private Users usr = new Users();
	private UsersSrv usersSrv;
	private List rows;
	
	public String execute()throws Exception{
		System.out.println("ɾ���û�:"+usr.getUsersId());
		if(usersSrv.deleteUser(usr)){
			rows = usersSrv.findAll();
			return SUCCESS;
		}
		return ERROR;
	}
	@Override
	public Users getModel() {
		// TODO Auto-generated method stub
		return usr;
	}
	
	public UsersSrv getUsersSrv() {
		return usersSrv;
	}
	public void setUsersSrv(UsersSrv usersSrv) {
		this.usersSrv = usersSrv;
	}
	public List getRows() {
		return rows;
	}
	public void setRows(List rows) {
		this.rows = rows;
	}
	
}
